//引入路由
import { createRouter,createWebHistory } from "vue-router";

//引入一个可能创造的路由组件
import usermain from '@/components/usermain.vue'
import cardmain from '@/components/cardmain.vue'
import fieldmain from '@/components/fieldmain.vue'
import bookmain from '@/components/bookmain.vue'
import setup from '@/components/setup.vue'
import Administrator from "@/components/administrator.vue"
import login from "@/components/login.vue"
import register from "@/components/register.vue"
import administrator from "@/components/administrator.vue";
import newsmain from "@/components/newsmain.vue";
import postmain from "@/components/postmain.vue";
import teammain from "@/components/teammain.vue";
import teamgamemain from "@/components/teamgamemain.vue";
import teampersonmain from "@/components/teampersonmain.vue"
import main from "@/components/main.vue"
import main1 from "@/components/main1.vue"


import component from "element-plus/es/components/tree-select/src/tree-select-option.mjs";





//创建路由器
const router = createRouter(
    {
        history:createWebHistory(),
        routes:[
            {
                path:'/',
                component:login
            },
            {
                path:'/register',
                component:register
            },
            {
                path:'/administrator',
                component:administrator,
                children:[
                    {
                        path:'usermain',
                        component:usermain
                    },
                    {
                        path:'cardmain',
                        component:cardmain
                    },
                    {
                        path:'fieldmain',
                        component:fieldmain
                    },
                    {
                        path:'bookmain',
                        component:bookmain
                    },
                    {
                        path:'setup',
                        component:setup
                    },

                    {
                        path:'newsmain',
                        component:newsmain
                    },
                    
                    {
                        path:'postmain',
                        component:postmain
                    },

                    {
                        path:'teammain',
                        component:teammain
                    },
                    
                    {
                        path:'teamgamemain',
                        component:teamgamemain
                    },

                    {
                        path:'teampersonmain',
                        component:teampersonmain
                    },

                    {
                        path:'main',
                        component:main
                    },
                    {
                        path:'main1',
                        component:main1
                    }
                ]
            }
    
        ]
    }
)
export default router